﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserCP.Master" AutoEventWireup="true" CodeBehind="ViewAllTicketsOfUser.aspx.cs" Inherits="University.Workshop.WebApp.ViewAllTicketsOfUser" ValidateRequest="false" EnableEventValidation="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style=' margin-bottom:20px;background-color: #4b6c9e; color: White; width: 650px;'>
        <h4 style='margin-top: 4px; font-size: large; color: White'>
           &nbsp;>All your sent tickets
        </h4>
    </div>
    <asp:MultiView runat="server" ID="MultiViewShowTickets">
        <asp:View runat="server" ID="ShowTickets">
        <asp:ScriptManager runat="server" ID="scriptMan"></asp:ScriptManager>
            <asp:UpdatePanel runat="server">
                <ContentTemplate>
                    <div>
                        <table>
                            <tr>
                                <td style='width: 120px'>
                                </td>
                                <td>
                                    <h3 id="ShowContent2" runat="server" style='margin-top: 0px'>
                                        Showing
                                    </h3>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div>
                        <asp:DataList ID="dataListTickets" runat="server" Width="634px" OnItemCommand="DL_ItemCommand">
                            <HeaderTemplate>
                                <table style='border-collapse: collapse; border: 1; width="100%;'>
                                    <thead bgcolor="#4b6c9e" style="font-weight: bold; color: white; font-size: medium;">
                                        <td style='height: 25px; border-right: 1px white solid;'>
                                            Title of the Issue
                                        </td>
                                        <td style='border-right: 1px white solid; width: 90px;'>
                                            Date
                                        </td>
                                        <td style='border-right: 1px white solid; width: 90px'>
                                            Status
                                        </td>
                                    </thead>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr style='color: Black; background-color: White; border: 1px #3A4F63 solid;' <%# TRJavaScript(Container) %>>
                                    <td style='border-right: 1px #3A4F63 solid; height: 25px; font-size: medium;'>
                                        <asp:Button Style="display: none;" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Id")%>'
                                            CausesValidation="false" ID="HiddenButton" runat="server" Text="View"></asp:Button>
                                        <%# DataBinder.Eval(Container.DataItem, "IssueTitle")%>
                                    </td>
                                    <td style='border-right: 1px #3A4F63 solid; height: 25px; font-size: medium;'>
                                        <%# DataBinder.Eval(Container.DataItem, "Date.Day")%>/<%# DataBinder.Eval(Container.DataItem, "Date.Month")%>/<%# DataBinder.Eval(Container.DataItem, "Date.Year")%>
                                    </td>
                                    <td style="height: 25px; font-size: medium;">
                                        <%# DataBinder.Eval(Container.DataItem, "Status")%>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:DataList>
                    </div>
                    <div>
                        <table>
                            <tr>
                                <td style='width: 120px'>
                                </td>
                                <td>
                                    <h3 id="ShowContent" runat="server" style='margin-top: 0px'>
                                        Showing
                                    </h3>
                                </td>
                                <td>
                                    <asp:Button runat="server" ID="PrevButton" Text="<- Prev." OnClick="PrevButton_Click" />
                                </td>
                                <td>
                                    <asp:Button runat="server" ID="NextButton" Text="Next ->" OnClick="NextButton_Click" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:View>
        <asp:View runat="server" ID="NoTickets">
            <div>
                <h4 style="font-size: medium">You have no sent any tickets</h4>
            </div>
        </asp:View>
    </asp:MultiView>
</asp:Content>
